package com.ansatsing.adapter.ducks;
/**
 * 火鸡适配器：包装的像鸭子
 * @author sunyq
 *
 */
public class TurkeyAdapter implements Duck {
	private Turkey turkey;
	public TurkeyAdapter(Turkey turkey) {
		this.turkey = turkey;
	}
	
	public void quack() {
		turkey.gobble();
	}

	public void fly() {//模拟鸭子飞很长距离
		for(int i=0; i < 5; i++) {
			turkey.fly();
		}
	}

}
